#ifndef _ACCEPTOR_HPP_
#define _ACCEPTOR_HPP_

#include "InetAddress.hpp"
#include "Socket.hpp"

namespace wd{

class Acceptor{
public:
    Acceptor(int port, string ip);
    void ready();
    int accept();
    int fd();

private:
    void setReusetAddr(bool);
    void setReusetPort(bool);
    void bind();
    void listen();

private:
    InetAddress _addr;
    Socket _sock;

};

}

#endif

